package com.css.fxfzypg.manage.sampling.repository.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.handler.inter.IExcelDataModel;
import cn.afterturn.easypoi.handler.inter.IExcelModel;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.Date;

@Data
public class SamplingEntity implements Serializable, IExcelDataModel, IExcelModel {

    private String id;
    private String taskName;

    @Excel(name = "*任务编号",width = 20)
    private String taskCode;
    @Excel(name = "*实地调查点名称",width = 30)
    private String fieldSurveyName;
    @Excel(name = "*经度",width = 20)
    private String longitude;
    @Excel(name = "*纬度",width = 20)
    private String latitude;
    @Excel(name = "*省",width = 25)
    private String province;
    private String provinceId;
    @Excel(name = "*市",width = 25)
    private String city;
    private String cityId;
    @Excel(name = "*县",width = 25)
    private String area;
    private String areaId;
    @Excel(name = "*所属乡镇",width = 30)
    private String township;
    private String townshipId;
    private String assignorName;
    private String assignorId;
    @Excel(name = "*总户数",width = 20)
    private String totalHouseholdNum;
    @Excel(name = "*总人口(人)",width = 20)
    private String totalPopulation;
    @Excel(name = "*实际常驻人口(人)",width = 30)
    private String actualResidentPopulation;
    @Excel(name = "*外出务工人口(人)",width = 30)
    private String migrantWorkers;

    @Excel(name = "*人口比例%（少年儿童）",width = 30)
    @Pattern(regexp = "(^-?[1-9](\\d+)?(\\.\\d{1,2})?$)|(^-?0$)|(^-?\\d\\.\\d{1,2}$)", message = "最多保留两位小数!")
    private String childrenProportion;

    @Excel(name = "*人口比例%（中青年）",width = 30)
    @Pattern(regexp = "(^-?[1-9](\\d+)?(\\.\\d{1,2})?$)|(^-?0$)|(^-?\\d\\.\\d{1,2}$)", message = "最多保留两位小数!")
    private String youngProportion;

    @Excel(name = "*人口比例%（老年）",width = 30)
    @Pattern(regexp = "(^-?[1-9](\\d+)?(\\.\\d{1,2})?$)|(^-?0$)|(^-?\\d\\.\\d{1,2}$)", message = "最多保留两位小数!")
    private String oldAgeProportion;
    //人均收入
    private String perCapitaIncome;
    //主要经济来源
    private String mainEconomicSources;
    @Excel(name = "*交通通达情况",width = 30)
    private String trafficConditions;
    @Excel(name = "周边地理环境",width = 30)
    private String environment;
    @Excel(name = "*房屋数量",width = 20)
    private String houseNum;
    @Excel(name = "*房屋平均间数",width = 30)
    private String roomAverageNum;
    @Excel(name = "*主要建筑材料",width = 30)
    private String mainBuildingMaterials;

    @Excel(name = "*房屋类型比例%(高层建筑)",width = 30)
    @Pattern(regexp = "(^-?[1-9](\\d+)?(\\.\\d{1,2})?$)|(^-?0$)|(^-?\\d\\.\\d{1,2}$)", message = "最多保留两位小数!")
    private String highStructure;

    @Excel(name = "*房屋类型比例%(钢结构)",width = 30)
    @Pattern(regexp = "(^-?[1-9](\\d+)?(\\.\\d{1,2})?$)|(^-?0$)|(^-?\\d\\.\\d{1,2}$)", message = "最多保留两位小数!")
    private String steelStructure;

    @Excel(name = "*房屋类型比例%(多层钢筋混凝土结构)",width = 35)
    @Pattern(regexp = "(^-?[1-9](\\d+)?(\\.\\d{1,2})?$)|(^-?0$)|(^-?\\d\\.\\d{1,2}$)", message = "最多保留两位小数!")
    private String concreteStructure;

    @Excel(name = "*房屋类型比例%(砖混结构)",width = 30)
    @Pattern(regexp = "(^-?[1-9](\\d+)?(\\.\\d{1,2})?$)|(^-?0$)|(^-?\\d\\.\\d{1,2}$)", message = "最多保留两位小数!")
    private String masonryStructure;

    @Excel(name = "*房屋类型比例%(砖木结构)",width = 30)
    @Pattern(regexp = "(^-?[1-9](\\d+)?(\\.\\d{1,2})?$)|(^-?0$)|(^-?\\d\\.\\d{1,2}$)", message = "最多保留两位小数!")
    private String brickWoodStructure;

    @Excel(name = "*房屋类型比例%(土结构)",width = 30)
    @Pattern(regexp = "(^-?[1-9](\\d+)?(\\.\\d{1,2})?$)|(^-?0$)|(^-?\\d\\.\\d{1,2}$)", message = "最多保留两位小数!")
    private String soilStructure;

    @Excel(name = "*房屋类型比例%(木结构)",width = 30)
    @Pattern(regexp = "(^-?[1-9](\\d+)?(\\.\\d{1,2})?$)|(^-?0$)|(^-?\\d\\.\\d{1,2}$)", message = "最多保留两位小数!")
    private String woodStructure;

    @Excel(name = "*房屋类型比例%(石结构)",width = 30)
    @Pattern(regexp = "(^-?[1-9](\\d+)?(\\.\\d{1,2})?$)|(^-?0$)|(^-?\\d\\.\\d{1,2}$)", message = "最多保留两位小数!")
    private String stoneStructure;

    @Excel(name = "*房屋类型比例%(其他结构)",width = 30)
    @Pattern(regexp = "(^-?[1-9](\\d+)?(\\.\\d{1,2})?$)|(^-?0$)|(^-?\\d\\.\\d{1,2}$)", message = "最多保留两位小数!")
    private String otherStructure;

    @Excel(name = "*房屋建造年代比例%(1970年以前)",width = 35)
    @Pattern(regexp = "(^-?[1-9](\\d+)?(\\.\\d{1,2})?$)|(^-?0$)|(^-?\\d\\.\\d{1,2}$)", message = "最多保留两位小数!")
    private String build70sBefore;

    @Excel(name = "*房屋建造年代比例%(1971年-1980年)",width = 35)
    @Pattern(regexp = "(^-?[1-9](\\d+)?(\\.\\d{1,2})?$)|(^-?0$)|(^-?\\d\\.\\d{1,2}$)", message = "最多保留两位小数!")
    private String build70s;

    @Excel(name = "*房屋建造年代比例%(1981年-1990年)",width = 35)
    @Pattern(regexp = "(^-?[1-9](\\d+)?(\\.\\d{1,2})?$)|(^-?0$)|(^-?\\d\\.\\d{1,2}$)", message = "最多保留两位小数!")
    private String build80s;

    @Excel(name = "*房屋建造年代比例%(1991年-2000年)",width = 35)
    @Pattern(regexp = "(^-?[1-9](\\d+)?(\\.\\d{1,2})?$)|(^-?0$)|(^-?\\d\\.\\d{1,2}$)", message = "最多保留两位小数!")
    private String build90s;

    @Excel(name = "*房屋建造年代比例%(2001年-2010年)",width = 35)
    @Pattern(regexp = "(^-?[1-9](\\d+)?(\\.\\d{1,2})?$)|(^-?0$)|(^-?\\d\\.\\d{1,2}$)", message = "最多保留两位小数!")
    private String build00s;

    @Excel(name = "*房屋建造年代比例%(2011年-2015年)",width = 35)
    @Pattern(regexp = "(^-?[1-9](\\d+)?(\\.\\d{1,2})?$)|(^-?0$)|(^-?\\d\\.\\d{1,2}$)", message = "最多保留两位小数!")
    private String build10s;

    @Excel(name = "*房屋建造年代比例%(2016年-2020年)",width = 35)
    @Pattern(regexp = "(^-?[1-9](\\d+)?(\\.\\d{1,2})?$)|(^-?0$)|(^-?\\d\\.\\d{1,2}$)", message = "最多保留两位小数!")
    private String build16s;

    @Excel(name = "*房屋建造年代比例%(2021年及以后)",width = 35)
    @Pattern(regexp = "(^-?[1-9](\\d+)?(\\.\\d{1,2})?$)|(^-?0$)|(^-?\\d\\.\\d{1,2}$)", message = "最多保留两位小数!")
    private String build20s;

    @Excel(name = "*周边是否有学校",width = 20)
    private String isSchool;
    @Excel(name = "学生数",width = 10)
    private String studentNum;
    @Excel(name = "教室数",width = 10)
    private String classroomNum;
    @Excel(name = "*周边是否有医院",width = 20)
    private String isHospital;
    @Excel(name = "医生数",width = 10)
    private String doctorNum;
    @Excel(name = "床位数",width = 10)
    private String bedNum;
    @Excel(name = "*周边是否有地质灾害",width = 20)
    private String isDisaster;
    @Excel(name = "类型",width = 10)
    private String disasterType;
    @Excel(name = "规模",width = 10)
    private String disasterScale;
    @Excel(name = "*周边是否有水库",width = 20)
    private String isReservoir;
    @Excel(name = "坝型",width = 10)
    private String damType;
    @Excel(name = "库容",width = 10)
    private String reservoirCapacity;
    @Excel(name = "备注说明",width = 20)
    private String remarks;

    /**
     * 空间数据
     */
    private String geom;

    //高层结构
    private String highFeature;
    //钢结构
    private String steelFeature;
    //多层钢筋混凝土结构
    private String concreteFeature;
    //砖混结构
    private String masonryFeature;
    //砖木结构
    private String brickWoodFeature;
    //土结构
    private String soilFeature;
    //木结构
    private String woodFeature;
    //石结构
    private String stoneFeature;
    //其他结构
    private String otherFeature;


    private String isSubmit;
    private String delFlag;
    private String createName;
    private String createId;
    private Date createTime;
    private String submitter;
    private String submitterId;
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date submitTime;

    private Integer rowNum;
    private String errorMsg;
    private String typePieId;
    private String yearsPieId;
}
